<include file="header" />
<body>
<div class="wraper" js="">
	<div class="head clearfix">
		<a href="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
		<span class="head-name pull-left">充值记录</span>
		<a href="#" class="pull-left text-right"></a>
	</div>
	<!--没有记录-->
	<!--<div class="norecord">
		<img src="/assets/base/rechargecard/images/nonelist.png"/>
		<p class="text-grey">还没有充值记录</p>
	</div>-->

	<volist name="data" id="vo">
		<div class="lists">
			<div class="list-line"><span class="text-green"><if condition="$vo.status eq 3">已圈存<else/>未圈存</if></span><span class="text-grey pull-right">{BEESCRM:$vo.create_time|date="Y-m-d H:i:s",###}</span></div>
			<div class="list-line">{BEESCRM:$vo.username}{BEESCRM:$vo.card_sn} <span class="pull-right">{BEESCRM:$vo.order_amount}元</span></div>
		</div>
	</volist>
	<div class="datalist">

	</div>
<input type="hidden" id="pagecount" value="{BEESCRM:$pageCount}">
<input type="hidden" id="account_id" value="{BEESCRM:$account_id}">
</div>
<script type="text/javascript" src="/assets/public/seajs/sea.js"></script>
<script enter="publicjs/public" id="confnode" async="async" src="/assets/public/config.js"></script>
<include file="commonJs" />
<script>
	$(function(){
		var page = 1;
		var pageCount = $("#pagecount").val();
		$(window).scroll(function() {
			//当内容滚动到底部时加载新的内容
			if ($(window).scrollTop() + $(window).height() + 20 > $(document).height()) {
				//当前要加载的页码
				page++;
				if(page <= pageCount){
					LoadPage(page);
				}
			}
		});
		function LoadPage(page){
			var account_id = $("#account_id").val();
			$.ajax({
				'url': "/base/WaterCharge/rechargeLogAjax",
				'data': {p:page,account_id:account_id},
				'dataType':'json',
				'type': 'GET',
				'async': false,
				success: function(data){
					if(data.status == 'S'){
						var info = data.result;
						$(info).each(function(idx) {
							var val = info[idx];
							$('.datalist').append('<div class="lists"><div class="list-line"><span class="text-green">'+val['status']+'</span><span class="text-grey pull-right">'+val['create_time']+
							'</span></div> <div class="list-line">'+val['username']+val['card_sn']+'<span class="pull-right">'+val['order_amount']+'元</span></div> </div>');
						});

					}
				}
			});
		}
	});

</script>
</body>
</html>